package com.example.myapplication

import com.example.myapplication.soaprequest.SoapEnvelop
import com.example.mylibrary.network.*
import io.reactivex.Observable

import retrofit2.Call
import retrofit2.http.*

interface ServerConnectApi {

    @Headers(UrlConfig.NORMAL_HOST)
    @GET("Client/GetMobileClientRegInfo")
    fun getMobileClient(
        @QueryMap params: Map<String, String>
    ): Call<BaseData>

    @RequestConverter(ConverterFormat.XML)
    @ResponseConverter(ConverterFormat.XML)
    @Headers(
        "Content-Type:text/xml; charset=utf-8",
        UrlConfig.PRIVATE_HOST_HEADER
    )
    @POST(BuildConfig.URL)
    fun soapRequest(@Body requestBody: SoapEnvelop): Observable<SoapEnvelop>

}